<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>HelloWorld</title>
</head>
<body>
    <hello-world></hello-world>
    <script>
        class HelloWorld extends HTMLElement {
            constructor() {
                super();
                const shadowDOM = this.attachShadow({mode: 'open'});
                const container = document.createElement('h1');
                container.innerHTML = 'Hello World';
                shadowDOM.appendChild(container);
            }
        }
        customElements.define('hello-world', HelloWorld);
    </script>
</body>
</html>